 /* Variables for easy theme switching */
:root {
    --bg-dark: #1a1a2e; /* Deep dark background */
    --accent-color: #00f0ff; /* Electric blue accent */
    --text-light: #e0e0e0; /* Light text for dark background */
    --text-muted: #a0a0a0; /* Muted text */
    --card-bg: #2a2a3e; /* Slightly lighter dark for cards/elements */
    --border-color: #3a3a5e; /* Subtle border color */
    --button-primary-bg: var(--accent-color);
    --button-primary-text: #1a1a2e;
    --button-secondary-bg: #4a4a5e;
    --button-secondary-text: var(--text-light);
    --hover-effect: #00d0e0; /* Slightly darker accent on hover */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-light);
    background-color: var(--bg-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-effect);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 100px 0;
}

/* Global Section Titles & Subtitles */
.section-title {
    font-size: 2.8em;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1em;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--button-primary-bg);
    color: var(--button-primary-text);
}

.btn-primary:hover {
    background-color: var(--hover-effect);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--button-secondary-text);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--button-primary-text);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

/* Header & Navigation */
.main-header {
    background-color: rgba(26, 26, 46, 0.95); /* Semi-transparent dark background */
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent-color);
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 40px;
}

.main-nav ul li a {
    color: var(--text-light);
    font-weight: 600;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none; /* Hidden by default for desktop */
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8em;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark), #0f0f1d);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for fixed header */
    position: relative;
    overflow: hidden; /* For potential background animations */
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.hero-content {
    flex: 1;
    min-width: 300px; /* Minimum width for content block */
}

.hero-content h1 {
    font-size: 3.8em;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 600px;
    color: var(--text-light); /* Make hero text lighter */
}

.hero-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(93, 242, 150, 0.2);
}

/* Animation utility classes */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.8s forwards;
}

.animate-in.delay-1 { animation-delay: 0.2s; }
.animate-in.delay-2 { animation-delay: 0.4s; }
.animate-in.delay-3 { animation-delay: 0.6s; }
.animate-in.delay-4 { animation-delay: 0.8s; }
.animate-in.delay-5 { animation-delay: 1.0s; }
.animate-in.delay-6 { animation-delay: 1.2s; }


@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
    border-color: var(--accent-color);
}

.service-item .icon {
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1em;
    color: var(--text-muted);
}

/* About Section */
.about-section .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    flex-wrap: wrap;
}

.about-content {
    flex: 1;
    min-width: 300px;
}

.about-content .section-title {
    text-align: left;
    margin-left: 0;
}
.about-content .section-title::after {
    left: 0;
    transform: translateX(0);
}

.about-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.about-features {
    margin-bottom: 30px;
}

.about-features li {
    font-size: 1.05em;
    margin-bottom: 10px;
    color: var(--text-light);
}

.about-features li i {
    color: var(--accent-color);
    margin-right: 10px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.6em;
}

.portfolio-overlay p {
    color: var(--text-light);
    font-size: 0.9em;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 60px;
    margin-top: 40px;
}

.contact-info {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    font-size: 2em;
    margin-bottom: 30px;
}

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: var(--text-light);
}

.contact-info p i {
    color: var(--accent-color);
    margin-right: 15px;
    font-size: 1.2em;
}

 
.contact-form-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
}

.contact-form textarea {
    resize: vertical;
}

/* Footer */
.main-footer {
    background-color: #11111f; /* Even darker shade for footer */
    color: var(--text-muted);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.main-footer p {
    margin-bottom: 0;
}

.footer-nav ul {
    display: flex;
    gap: 25px;
}

.footer-nav a {
    color: var(--text-muted);
    font-size: 0.9em;
}

.footer-nav a:hover {
    color: var(--accent-color);
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: var(--button-primary-text);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.4);
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 999;
    opacity: 0; /* Hidden by default */
    pointer-events: none;
}

.back-to-top-btn.show {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top-btn:hover {
    background-color: var(--hover-effect);
    transform: translateY(-5px);
}


/* Chatbot Styles */

#chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-toggle-button {
    background-color: var(--accent-color);
    color: var(--button-primary-text);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 4px 10px rgba(0, 255, 255, 0.4);
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    flex-shrink: 0;
}

.chatbot-toggle-button:hover {
    background-color: var(--hover-effect);
    transform: scale(1.05);
}

.chatbot-container {
    width: 350px;
    height: 450px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    transition: all 0.3s ease-out;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    border: 1px solid var(--border-color);
}

.chatbot-container.chatbot-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    display: none; /* Hide completely when not visible */
}

.chatbot-container.chatbot-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    display: flex;
}

#chatbot-header {
    background-color: var(--bg-dark); /* Darker header for contrast */
    color: var(--accent-color);
    padding: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chatbot-close-button {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
}
.chatbot-close-button:hover {
    color: var(--text-light);
}

#chatbot-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--bg-dark); /* Slightly lighter background for messages */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.95em;
}

.message.user {
    align-self: flex-end;
    background-color: var(--accent-color);
    color: var(--button-primary-text);
    border-bottom-right-radius: 0;
}

.message.bot {
    align-self: flex-start;
    background-color: var(--border-color); /* Subtle dark for bot messages */
    color: var(--text-light);
    border-bottom-left-radius: 0;
}

.chatbot-input-area {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

#chatbot-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-right: 10px;
    font-size: 1rem;
    background-color: var(--bg-dark);
    color: var(--text-light);
    outline: none;
}
#chatbot-input:focus {
    border-color: var(--accent-color);
}

.chatbot-send-button {
    background-color: var(--accent-color);
    color: var(--button-primary-text);
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chatbot-send-button:hover {
    background-color: var(--hover-effect);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .main-nav {
        display: none; /* Hide nav on smaller screens, will be toggled by JS */
    }
    .main-header .container {
        justify-content: center; /* Center logo if no nav */
    }
    .nav-toggle {
        display: block; /* Show toggle button */
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }

    .hero-section .container,
    .about-section .container {
        flex-direction: column;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content p {
        font-size: 1em;
    }
    .hero-content .section-title,
    .about-content .section-title {
        text-align: center;
    }
    .hero-content .section-title::after,
    .about-content .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-image, .hero-image {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.2em;
    }
    .section-subtitle {
        font-size: 1em;
    }
    .service-item, .portfolio-item, .contact-info, .contact-form-container {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5em;
    }
    .main-header .logo {
        font-size: 1.5em;
    }
    .section-padding {
        padding: 60px 0;
    }
    .main-header .container {
        flex-direction: column;
        gap: 10px;
    }
    .nav-toggle {
        top: 20px;
        right: 20px;
    }

    /* Chatbot adjustments for small screens */
    #chatbot-widget {
        bottom: 15px;
        right: 15px;
    }
    .chatbot-container {
        width: calc(100% - 30px);
        height: 70vh; /* Make it taller on small screens */
        bottom: 75px;
        left: 50%;
        transform: translateX(-50%) translateY(20px) scale(0.9);
        right: auto; /* Remove right positioning */
    }
}